<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>  
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  <title>物资管理/药品</title>
  <%@ include file="../link_script.jsp" %>
  <script src="js/pmis/pmis-medicine.js" language="javascript" type="text/javascript"></script>
</head>
<body>
<html:form styleId="list" action="/medicine.do">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_list.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table id="theObjTable" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6" onMouseOver="javascript:changeto();" onmouseout="javascript:changeback();">
          <tr>
            <td width="4%" class="tdClass">选择</td>
            <td width="4%" class="tdClass">序号</td>
            <td width="18%" class="tdClass">药品名称</td>
            <td width="18%" class="tdClass">生产厂家</td>
            <td width="8%" class="tdClass">购买日期</td>
            <td width="8%" class="tdClass">购买日期</td>
            <td width="6%" class="tdClass">状态</td>
            <td width="6%" class="tdClass">费用/￥</td>
            <td width="7%" class="tdClass">卖家</td>
            <td width="4%" class="tdClass">结算</td>
            <td width="10%" class="tdClass">常用操作</td>
            <td width="*" class="tdClass">...</td>           
          </tr>
          <logic:notEmpty name="medicineList">
          <% int i = 0; %>
            <logic:iterate id="var" name="medicineList">
            <% i++; %>
              <tr>
                <c:if test="${var.medicineState=='1'}">
                <td class="STYLE22"><input type="checkbox" name="ids" value="${var.medicineID}" /></td>
                <td class="STYLE22"><%=i %></td>
                <td class="STYLE21">            
                <script type="text/javascript">
                  $("ABBR").unbind("click") // 删除所有p元素上的单击事件
                  $("ABBR").bind("click", function() {
	                alert($(this).text());
                  }); // 为每个p元素添加单击事件
                </script><abbr>&nbsp;<bean:write name="var" property="medicineName" /></abbr></td>
                <td class="STYLE21">&nbsp;<bean:write name="var" property="manufacturer" /></td>
                <td class="STYLE22"><bean:write name="var" property="medicineDate" /></td>
                <td class="STYLE22"><bean:write name="var" property="validPeriod" /></td>
                <td class="STYLE22"><a href="medicine.do?method=updateMedicineState&medicineID=${var.medicineID}&state=weiwan&pageNum=${pageNum }">未完</a></td>
                <td class="STYLE23"><bean:write name="var" property="medicineExpense" />￥&nbsp;</td>
                <td class="STYLE21">&nbsp;${var.shopName }</td>
                <c:if test="${var.medicinePay=='0'}">
                <td class="STYLE22">已结</td>
                <td class="STYLE22"><a href="medicine.do?method=detailMedicine&medicineID=${var.medicineID}">明细</a>&nbsp;结算</td></c:if>
                <c:if test="${var.medicinePay=='1'}">
                <td class="STYLE22"><font color="red">未结</font></td>
                <td class="STYLE22"><a href="medicine.do?method=detailMedicine&medicineID=${var.medicineID}">明细</a>&nbsp;<a href="medicine.do?method=payMedicine&medicineID=${var.medicineID}&pageNum=${pageNum}">结算</a></td></c:if>
                <td class="STYLE22">&nbsp;&nbsp;</td>
                </c:if>
                <c:if test="${var.medicineState=='0'}">
                <td class="STYLE12"><input type="checkbox" name="ids" value="${var.medicineID}" /></td>
                <td class="STYLE12"><%=i %></td>
                <td class="STYLE11">            
                <script type="text/javascript">
                  $("ABBR").unbind("click") // 删除所有p元素上的单击事件
                  $("ABBR").bind("click", function() {
	                alert($(this).text());
                  }); // 为每个p元素添加单击事件
                </script><abbr>&nbsp;<bean:write name="var" property="medicineName" /></abbr></td>                
                <td class="STYLE11">&nbsp;<bean:write name="var" property="manufacturer" /></td>
                <td class="STYLE12"><bean:write name="var" property="medicineDate" /></td>
                <td class="STYLE12"><bean:write name="var" property="validPeriod" /></td>
                <td class="STYLE12"><a href="medicine.do?method=updateMedicineState&medicineID=${var.medicineID}&state=yongwan&pageNum=${pageNum }">用完</a></td>
                <td class="STYLE13"><bean:write name="var" property="medicineExpense" />￥&nbsp;</td>
                <td class="STYLE11">&nbsp;${var.shopName }</td>
                <c:if test="${var.medicinePay=='0'}">
                <td class="STYLE12">已结</td>
                <td class="STYLE12"><a href="medicine.do?method=detailMedicine&medicineID=${var.medicineID}">明细</a>&nbsp;结算</td></c:if>
                <c:if test="${var.medicinePay=='1'}">
                <td class="STYLE12"><font color="red">未结</font></td>
                <td class="STYLE12"><a href="medicine.do?method=detailMedicine&medicineID=${var.medicineID}">明细</a>&nbsp;<a href="medicine.do?method=payMedicine&medicineID=${var.medicineID}&pageNum=${pageNum}">结算</a></td></c:if>
                <td class="STYLE12">&nbsp;&nbsp;</td>
                </c:if>
              </tr>
            </logic:iterate>
          </logic:notEmpty>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../page.jsp"%>
</table>
</html:form>
</body>
</html>

